<?php 
namespace Zbsht\Model;
use Think\Model\RelationModel;


class RoleRelationModel extends RelationModel{


	//定义主表名称
	protected $tableName = 'role';//以user表为基准表


	protected $_link = array(
		'node'	=> 	array(
			'mapping_type'	=>	self::MANY_TO_MANY,
			'foreign_key'	=>	'role_id',
			'relation_key'	=>	'node_id',
			'relation_table'=>	'think_access',
		),
	);

}

















 ?>